package com.vending.service.impl;

import com.vending.mapper.PointMapper;
import com.vending.model.entity.Point;
import com.vending.service.PointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PointServiceImpl implements PointService {

    @Autowired
    private PointMapper pointMapper;

    @Override
    public List<Point> list(Point point) {
        return pointMapper.selectList(point);
    }

    @Override
    public Point getById(Integer id) {
        return pointMapper.selectById(id);
    }

    @Override
    public void add(Point point) {
        pointMapper.insert(point);
    }

    @Override
    public void update(Point point) {
        pointMapper.updateById(point);
    }

    @Override
    public void delete(Integer id) {
        pointMapper.deleteById(id);
    }
} 